package com.study.youlai.system.converter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.study.youlai.common.model.Option;
import com.study.youlai.system.model.entity.DictDataForm;
import com.study.youlai.system.model.entity.SysDictData;
import com.study.youlai.system.model.vo.DictPageVO;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @ClassName: DictDataConverter
 * @Description: 字典项 对象转换器
 * @Author: li
 * @Date: 2025/1/14 11:44
 * @Version 1.0
 **/
@Mapper(componentModel = "spring")
public interface DictDataConverter {

    Page<DictPageVO> toPageVo(Page<SysDictData> page);

    DictDataForm toForm(SysDictData entity);

    SysDictData toEntity(DictDataForm formFata);

    Option<Long> toOption(SysDictData dictData);
    List<Option<Long>> toOption(List<SysDictData> dictData);
}
